import 'package:flutter/material.dart';
import 'package:ml_flutter/pages/mllogincontroller.dart';
import 'package:ml_flutter/pages/tabbarcontroller.dart';


void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  MyApp({Key key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool isLoginVC;
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    isLoginVC = true;
  }
  @override
  Widget build(BuildContext context) {
    return  MaterialApp(
      title: '智慧家校',
      debugShowCheckedModeBanner: true,
      theme: ThemeData(
          primarySwatch: Colors.cyan,
          appBarTheme:
              AppBarTheme.of(context).copyWith(brightness: Brightness.light)),
      // home: MLTabbarController(),
      
      home: isLoginVC?MLLoginViewController(block:(){
        
         setState(() {
           isLoginVC = false;
         });
      },):MLTabbarController(),
    );
  }
}


